﻿
//

//


using EMSNet.Core;
using System.ComponentModel.DataAnnotations;

namespace EMSNet.Service;

/// <summary>
/// 仪表管理基础输入参数
/// </summary>
public class EmsDeviceBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 采集点编码
    /// </summary>
    public virtual string? PollPointCode { get; set; }
    
    /// <summary>
    /// 仪器编号
    /// </summary>
    public virtual string? DeviceCode { get; set; }
    
    /// <summary>
    /// 设备名称
    /// </summary>
    public virtual string? DeviceName { get; set; }
    
    /// <summary>
    /// 协议
    /// </summary>
    public virtual string? ProtoType { get; set; }
    
    /// <summary>
    /// IP/DIR
    /// </summary>
    public virtual string? Address { get; set; }
    
    /// <summary>
    /// Port
    /// </summary>
    public virtual string? Port { get; set; }
    
    /// <summary>
    /// RequestMsg
    /// </summary>
    public virtual string? RequestMsg { get; set; }
    
    /// <summary>
    /// MsgSlavel
    /// </summary>
    public virtual string? MsgSlavel { get; set; }
    
    /// <summary>
    /// 偏移公式
    /// </summary>
    public virtual string? OffsetFunction { get; set; }
    
    /// <summary>
    /// 偏移系数
    /// </summary>
    public virtual string? OffsetPercent { get; set; }
    
    /// <summary>
    /// 偏移量
    /// </summary>
    public virtual string? OffsetDataVale { get; set; }
    
    /// <summary>
    /// 数据类型
    /// </summary>
    public virtual string? DataType { get; set; }
    
    /// <summary>
    /// 数据格式
    /// </summary>
    public virtual string? DataFormat { get; set; }
    
    /// <summary>
    /// 值
    /// </summary>
    public virtual string? DataValue { get; set; }
    
    /// <summary>
    /// 仪表值
    /// </summary>
    public virtual string? DeviceValue { get; set; }
    
    /// <summary>
    /// 读表时间
    /// </summary>
    public virtual string? ReadTime { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    public virtual string? Status { get; set; }
    
}

/// <summary>
/// 仪表管理分页查询输入参数
/// </summary>
public class PageEmsDeviceInput : BasePageInput
{
    /// <summary>
    /// 采集点编码
    /// </summary>
    public string? PollPointCode { get; set; }
    
    /// <summary>
    /// 仪器编号
    /// </summary>
    public string? DeviceCode { get; set; }
    
    /// <summary>
    /// 设备名称
    /// </summary>
    public string? DeviceName { get; set; }
    
    /// <summary>
    /// 协议
    /// </summary>
    public string? ProtoType { get; set; }
    
    /// <summary>
    /// IP/DIR
    /// </summary>
    public string? Address { get; set; }
    
    /// <summary>
    /// Port
    /// </summary>
    public string? Port { get; set; }
    
    /// <summary>
    /// RequestMsg
    /// </summary>
    public string? RequestMsg { get; set; }
    
    /// <summary>
    /// MsgSlavel
    /// </summary>
    public string? MsgSlavel { get; set; }
    
    /// <summary>
    /// 偏移公式
    /// </summary>
    public string? OffsetFunction { get; set; }
    
    /// <summary>
    /// 偏移系数
    /// </summary>
    public string? OffsetPercent { get; set; }
    
    /// <summary>
    /// 偏移量
    /// </summary>
    public string? OffsetDataVale { get; set; }
    
    /// <summary>
    /// 数据类型
    /// </summary>
    public string? DataType { get; set; }
    
    /// <summary>
    /// 数据格式
    /// </summary>
    public string? DataFormat { get; set; }
    
    /// <summary>
    /// 值
    /// </summary>
    public string? DataValue { get; set; }
    
    /// <summary>
    /// 仪表值
    /// </summary>
    public string? DeviceValue { get; set; }
    
    /// <summary>
    /// 读表时间
    /// </summary>
    public string? ReadTime { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    public string? Status { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 仪表管理增加输入参数
/// </summary>
public class AddEmsDeviceInput
{
    /// <summary>
    /// 采集点编码
    /// </summary>
    [MaxLength(32, ErrorMessage = "采集点编码字符长度不能超过32")]
    public string? PollPointCode { get; set; }
    
    /// <summary>
    /// 仪器编号
    /// </summary>
    [MaxLength(32, ErrorMessage = "仪器编号字符长度不能超过32")]
    public string? DeviceCode { get; set; }
    
    /// <summary>
    /// 设备名称
    /// </summary>
    [MaxLength(32, ErrorMessage = "设备名称字符长度不能超过32")]
    public string? DeviceName { get; set; }
    
    /// <summary>
    /// 协议
    /// </summary>
    [MaxLength(32, ErrorMessage = "协议字符长度不能超过32")]
    public string? ProtoType { get; set; }
    
    /// <summary>
    /// IP/DIR
    /// </summary>
    [MaxLength(32, ErrorMessage = "IP/DIR字符长度不能超过32")]
    public string? Address { get; set; }
    
    /// <summary>
    /// Port
    /// </summary>
    [MaxLength(32, ErrorMessage = "Port字符长度不能超过32")]
    public string? Port { get; set; }
    
    /// <summary>
    /// RequestMsg
    /// </summary>
    [MaxLength(32, ErrorMessage = "RequestMsg字符长度不能超过32")]
    public string? RequestMsg { get; set; }
    
    /// <summary>
    /// MsgSlavel
    /// </summary>
    [MaxLength(32, ErrorMessage = "MsgSlavel字符长度不能超过32")]
    public string? MsgSlavel { get; set; }
    
    /// <summary>
    /// 偏移公式
    /// </summary>
    [MaxLength(32, ErrorMessage = "偏移公式字符长度不能超过32")]
    public string? OffsetFunction { get; set; }
    
    /// <summary>
    /// 偏移系数
    /// </summary>
    [MaxLength(32, ErrorMessage = "偏移系数字符长度不能超过32")]
    public string? OffsetPercent { get; set; }
    
    /// <summary>
    /// 偏移量
    /// </summary>
    [MaxLength(32, ErrorMessage = "偏移量字符长度不能超过32")]
    public string? OffsetDataVale { get; set; }
    
    /// <summary>
    /// 数据类型
    /// </summary>
    [MaxLength(32, ErrorMessage = "数据类型字符长度不能超过32")]
    public string? DataType { get; set; }
    
    /// <summary>
    /// 数据格式
    /// </summary>
    [MaxLength(32, ErrorMessage = "数据格式字符长度不能超过32")]
    public string? DataFormat { get; set; }
    
    /// <summary>
    /// 值
    /// </summary>
    [MaxLength(32, ErrorMessage = "值字符长度不能超过32")]
    public string? DataValue { get; set; }
    
    /// <summary>
    /// 仪表值
    /// </summary>
    [MaxLength(32, ErrorMessage = "仪表值字符长度不能超过32")]
    public string? DeviceValue { get; set; }
    
    /// <summary>
    /// 读表时间
    /// </summary>
    [MaxLength(32, ErrorMessage = "读表时间字符长度不能超过32")]
    public string? ReadTime { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [MaxLength(32, ErrorMessage = "状态字符长度不能超过32")]
    public string? Status { get; set; }
    
}

/// <summary>
/// 仪表管理删除输入参数
/// </summary>
public class DeleteEmsDeviceInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 仪表管理更新输入参数
/// </summary>
public class UpdateEmsDeviceInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 采集点编码
    /// </summary>    
    [MaxLength(32, ErrorMessage = "采集点编码字符长度不能超过32")]
    public string? PollPointCode { get; set; }
    
    /// <summary>
    /// 仪器编号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "仪器编号字符长度不能超过32")]
    public string? DeviceCode { get; set; }
    
    /// <summary>
    /// 设备名称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "设备名称字符长度不能超过32")]
    public string? DeviceName { get; set; }
    
    /// <summary>
    /// 协议
    /// </summary>    
    [MaxLength(32, ErrorMessage = "协议字符长度不能超过32")]
    public string? ProtoType { get; set; }
    
    /// <summary>
    /// IP/DIR
    /// </summary>    
    [MaxLength(32, ErrorMessage = "IP/DIR字符长度不能超过32")]
    public string? Address { get; set; }
    
    /// <summary>
    /// Port
    /// </summary>    
    [MaxLength(32, ErrorMessage = "Port字符长度不能超过32")]
    public string? Port { get; set; }
    
    /// <summary>
    /// RequestMsg
    /// </summary>    
    [MaxLength(32, ErrorMessage = "RequestMsg字符长度不能超过32")]
    public string? RequestMsg { get; set; }
    
    /// <summary>
    /// MsgSlavel
    /// </summary>    
    [MaxLength(32, ErrorMessage = "MsgSlavel字符长度不能超过32")]
    public string? MsgSlavel { get; set; }
    
    /// <summary>
    /// 偏移公式
    /// </summary>    
    [MaxLength(32, ErrorMessage = "偏移公式字符长度不能超过32")]
    public string? OffsetFunction { get; set; }
    
    /// <summary>
    /// 偏移系数
    /// </summary>    
    [MaxLength(32, ErrorMessage = "偏移系数字符长度不能超过32")]
    public string? OffsetPercent { get; set; }
    
    /// <summary>
    /// 偏移量
    /// </summary>    
    [MaxLength(32, ErrorMessage = "偏移量字符长度不能超过32")]
    public string? OffsetDataVale { get; set; }
    
    /// <summary>
    /// 数据类型
    /// </summary>    
    [MaxLength(32, ErrorMessage = "数据类型字符长度不能超过32")]
    public string? DataType { get; set; }
    
    /// <summary>
    /// 数据格式
    /// </summary>    
    [MaxLength(32, ErrorMessage = "数据格式字符长度不能超过32")]
    public string? DataFormat { get; set; }
    
    /// <summary>
    /// 值
    /// </summary>    
    [MaxLength(32, ErrorMessage = "值字符长度不能超过32")]
    public string? DataValue { get; set; }
    
    /// <summary>
    /// 仪表值
    /// </summary>    
    [MaxLength(32, ErrorMessage = "仪表值字符长度不能超过32")]
    public string? DeviceValue { get; set; }
    
    /// <summary>
    /// 读表时间
    /// </summary>    
    [MaxLength(32, ErrorMessage = "读表时间字符长度不能超过32")]
    public string? ReadTime { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>    
    [MaxLength(32, ErrorMessage = "状态字符长度不能超过32")]
    public string? Status { get; set; }
    
}

/// <summary>
/// 仪表管理主键查询输入参数
/// </summary>
public class QueryByIdEmsDeviceInput : DeleteEmsDeviceInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataEmsDeviceInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 仪表管理数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportEmsDeviceInput : BaseImportInput
{
    /// <summary>
    /// 采集点编码 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public string? PollPointCode { get; set; }
    
    /// <summary>
    /// 采集点编码 文本
    /// </summary>
    [ImporterHeader(Name = "采集点编码")]
    [ExporterHeader("采集点编码", Format = "", Width = 25, IsBold = true)]
    public string PollPointCodeFkDisplayName { get; set; }
    
    /// <summary>
    /// 仪器编号
    /// </summary>
    [ImporterHeader(Name = "仪器编号")]
    [ExporterHeader("仪器编号", Format = "", Width = 25, IsBold = true)]
    public string? DeviceCode { get; set; }
    
    /// <summary>
    /// 设备名称
    /// </summary>
    [ImporterHeader(Name = "设备名称")]
    [ExporterHeader("设备名称", Format = "", Width = 25, IsBold = true)]
    public string? DeviceName { get; set; }
    
    /// <summary>
    /// 协议
    /// </summary>
    [ImporterHeader(Name = "协议")]
    [ExporterHeader("协议", Format = "", Width = 25, IsBold = true)]
    public string? ProtoType { get; set; }
    
    /// <summary>
    /// IP/DIR
    /// </summary>
    [ImporterHeader(Name = "IP/DIR")]
    [ExporterHeader("IP/DIR", Format = "", Width = 25, IsBold = true)]
    public string? Address { get; set; }
    
    /// <summary>
    /// Port
    /// </summary>
    [ImporterHeader(Name = "Port")]
    [ExporterHeader("Port", Format = "", Width = 25, IsBold = true)]
    public string? Port { get; set; }
    
    /// <summary>
    /// RequestMsg
    /// </summary>
    [ImporterHeader(Name = "RequestMsg")]
    [ExporterHeader("RequestMsg", Format = "", Width = 25, IsBold = true)]
    public string? RequestMsg { get; set; }
    
    /// <summary>
    /// MsgSlavel
    /// </summary>
    [ImporterHeader(Name = "MsgSlavel")]
    [ExporterHeader("MsgSlavel", Format = "", Width = 25, IsBold = true)]
    public string? MsgSlavel { get; set; }
    
    /// <summary>
    /// 偏移公式
    /// </summary>
    [ImporterHeader(Name = "偏移公式")]
    [ExporterHeader("偏移公式", Format = "", Width = 25, IsBold = true)]
    public string? OffsetFunction { get; set; }
    
    /// <summary>
    /// 偏移系数
    /// </summary>
    [ImporterHeader(Name = "偏移系数")]
    [ExporterHeader("偏移系数", Format = "", Width = 25, IsBold = true)]
    public string? OffsetPercent { get; set; }
    
    /// <summary>
    /// 偏移量
    /// </summary>
    [ImporterHeader(Name = "偏移量")]
    [ExporterHeader("偏移量", Format = "", Width = 25, IsBold = true)]
    public string? OffsetDataVale { get; set; }
    
    /// <summary>
    /// 数据类型
    /// </summary>
    [ImporterHeader(Name = "数据类型")]
    [ExporterHeader("数据类型", Format = "", Width = 25, IsBold = true)]
    public string? DataType { get; set; }
    
    /// <summary>
    /// 数据格式
    /// </summary>
    [ImporterHeader(Name = "数据格式")]
    [ExporterHeader("数据格式", Format = "", Width = 25, IsBold = true)]
    public string? DataFormat { get; set; }
    
    /// <summary>
    /// 值
    /// </summary>
    [ImporterHeader(Name = "值")]
    [ExporterHeader("值", Format = "", Width = 25, IsBold = true)]
    public string? DataValue { get; set; }
    
    /// <summary>
    /// 仪表值
    /// </summary>
    [ImporterHeader(Name = "仪表值")]
    [ExporterHeader("仪表值", Format = "", Width = 25, IsBold = true)]
    public string? DeviceValue { get; set; }
    
    /// <summary>
    /// 读表时间
    /// </summary>
    [ImporterHeader(Name = "读表时间")]
    [ExporterHeader("读表时间", Format = "", Width = 25, IsBold = true)]
    public string? ReadTime { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [ImporterHeader(Name = "状态")]
    [ExporterHeader("状态", Format = "", Width = 25, IsBold = true)]
    public string? Status { get; set; }
    
}
